/**
 * 
 */
package com.gr.staffpm.widget.calendar.model;

import org.apache.wicket.ajax.AjaxRequestTarget;

import com.gr.staffpm.gof.observer.Subscriber;
import com.gr.staffpm.pages.tasks.model.AbstractAjaxTaskLink;


/**
 * @author Graham Rhodes 7 Jan 2011 17:14:02
 */
public class AjaxChangeCalendarViewLink extends AbstractAjaxTaskLink {

    private static final long serialVersionUID = 1L;
    public static final String DAY_VIEW_SIGNAL = "dayView";
    public static final String WEEK_VIEW_SIGNAL = "weekView";
    public static final String MONTH_VIEW_SIGNAL = "monthView";
    private final String SIGNAL;

    public AjaxChangeCalendarViewLink(String id, Subscriber subscriber, String signal) {
        super(id, subscriber);
        this.SIGNAL = signal;
    }

    /* (non-Javadoc)
     * @see org.apache.wicket.ajax.markup.html.AjaxLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget)
     */
    @Override
    public void onClick(AjaxRequestTarget target) {
        notifySubscribers(SIGNAL, target);
    }

}
